package com.service.bean.signal;

import java.sql.Timestamp;
import java.util.Date;

import com.service.bean.alarm.AlarmInfo;
import com.service.bean.device.Vehicle;

/**
 * @author Admin
 *
 */
public class GpsBean {


	private String id;
	private String equipNum;
	private String equipmentId="";
	/**
	 *GPS时间 
	 */
	private Date gpsTime;
	
	/**
	 *经度 
	 */
	private double longitude;
	
	/**
	 *纬度 
	 */
	private double latitude;
	
	private String BaiduStreet;
	
	private double baiduLng;
	private double baiduLat;
	private String baiduLocation="";
	private int isBaiduPosition=0;
	private int isBaiduLocation=0;
	
	private boolean checkTime;

	
	/**
	 *速度 
	 */
	private double speed;
	
	/**
	 *脉冲速度 
	 */
	private int speed2;
	
	/**
	 *航向 
	 */
	private double direction;
	
	/**
	 *行驶里程 
	 */
	private double mileage;
	
	/**
	 *脉冲里程 
	 */
	private double mileage2;
	
	/**
	 *车型 
	 */
	private int vehicleType;
	
	/**
	 *油位 
	 */
	private double fuel;
	
	/**
	 *发动机转速 
	 */
	private double motorSpeed;
	
	/**
	 *副发动机转速 
	 */
	private double auxiMotorSpeed;
	
	/**
	 *扫盘转速 
	 */
	private double sweepSpeed; 
	
	/**
	 *扫盘转速2 
	 */
	private int sweepSpeed2; 
	
	/**
	 *臭味值 
	 */
	private double odorValue;
	
	/**
	 *可回收垃圾重量 
	 */
	private double recoWeight;
	
	/**
	 *不可回收垃圾重量 
	 */
	private double unrecoWeight;
	
	/**
	 *状态位 
	 */
	private long statusVal;
	
	/**
	 * 开关状态
	 */
	private long switchVal;
	
	/**
	 *故障状态 
	 */
	private long faultVal;
	
	/**
	 *报警分类
	 */
	private String alarmType;
	
	public String getAlarmType() {
		return alarmType;
	}

	public void setAlarmType(String alarmType) {
		this.alarmType = alarmType;
	}

	/**
	 *输出状态 
	 */
	private int outputVal;
	
	/**
	 * 定位状态
	 */
	private int gpsStatus;
	/**
	 * 车辆是否启动</br>
	 * 0：熄火状态</br>
	 * 1：启动状态
	 */
	private int accStatus;
	private int waterStatus;
	/**
	 * 垃圾倾倒
	 */
	private int dumpStatus;
	/**
	 * 污水排放
	 */
	private int sewageStatus;
	/**
	 * 扫盘状态
	 */
	private int plateStatus;
	/**
	 * 吸嘴状态
	 */
	private int nozzleStatus;
	/**
	 * 水位状态
	 */
	private int wateringStatus;
	private int binStatus;
	private String rawData;
	/**
	 * 公司代码
	 */
	private String companyCode;
	/**
	 * 今日里程
	 */
	private double todayMile;
	private int stuffStatus;
	/**
	 * 总里程
	 */
	private double totalMile;
	/**
	 * 垃圾收集
	 */
	private int strengthStatus;
	/**
	 * 是否在工作状态
	 */
	private int isInWork;
	private String alarmRemark;
	
	//特殊取用时的参数
	private String projectname;
	/**
	 * 车牌号
	 */
	private String plateNO;
	private String categoryName;
	private String driverNames;
	private String alarmCategoryName;
	private Timestamp alarmTime; 
	private Timestamp systemTime;
	private String alarmInfo;
	private String alarmName;
	
	private String projectId;
	private String kindcode;
	private int oilAmt2;
	private int oilAmt3;
	private double todayMile2;
	private double totalMile2;
	
	private Timestamp endTimestamp;
	private String cmdTitle;
	private double oilAmtCal; 
	private double oilAmtCal2; 
	private double oilAmtCal3; 
	
	/**
	 * 海拔高度
	 */
	private int heightAmt;  
	
	private int outPut0;  
	private int outPut1;      
	private int batteryStatus; 
	private int gpsAirStatus;
	private int configStatus; 
	
	private String areaId;
	
	private String refId;
	private int serviceStatus;
	
	private String rfid;
	private long keepTime;
	private int hasAlarm;
	// 测试字段
	private double oilValue;
	private double oilPercent;
	
	public String getRawData() {
		return rawData;
	}

	public void setRawData(String rawData) {
		this.rawData = rawData;
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getEquipNum() {
		return equipNum;
	}

	public void setEquipNum(String equipNum) {
		this.equipNum = equipNum;
	}

	public Date getGpsTime() {
		return gpsTime;
	}

	public void setGpsTime(Date gpsTime) {
		this.gpsTime = gpsTime;
	}

	public double getLongitude() {
		return longitude;
	}

	public void setLongitude(double longitude) {
		this.longitude = longitude;
	}

	public double getLatitude() {
		return latitude;
	}

	public void setLatitude(double latitude) {
		this.latitude = latitude;
	}

	public double getSpeed() {
		return speed;
	}

	public void setSpeed(double speed) {
		this.speed = speed;
	}

	public int getGpsStatus() {
		return gpsStatus;
	}

	public void setGpsStatus(int gpsStatus) {
		this.gpsStatus = gpsStatus;
	}

	public int getVehicleType() {
		return vehicleType;
	}

	public void setVehicleType(int vehicleType) {
		this.vehicleType = vehicleType;
	}


	public double getMotorSpeed() {
		return motorSpeed;
	}

	public void setMotorSpeed(double motorSpeed) {
		this.motorSpeed = motorSpeed;
	}

	public double getAuxiMotorSpeed() {
		return auxiMotorSpeed;
	}

	public void setAuxiMotorSpeed(double auxiMotorSpeed) {
		this.auxiMotorSpeed = auxiMotorSpeed;
	}

	public double getSweepSpeed() {
		return sweepSpeed;
	}

	public void setSweepSpeed(double sweepSpeed) {
		this.sweepSpeed = sweepSpeed;
	}

	public double getOdorValue() {
		return odorValue;
	}

	public void setOdorValue(double odorValue) {
		this.odorValue = odorValue;
	}

	public double getRecoWeight() {
		return recoWeight;
	}

	public void setRecoWeight(double recoWeight) {
		this.recoWeight = recoWeight;
	}

	public double getUnrecoWeight() {
		return unrecoWeight;
	}

	public void setUnrecoWeight(double unrecoWeight) {
		this.unrecoWeight = unrecoWeight;
	}

	public long getStatusVal() {
		return statusVal;
	}

	public void setStatusVal(long statusVal) {
		this.statusVal = statusVal;
	}

	public long getSwitchVal() {
		return switchVal;
	}

	public void setSwitchVal(long switchVal) {
		this.switchVal = switchVal;
	}

	public long getFaultVal() {
		return faultVal;
	}

	public void setFaultVal(long faultVal) {
		this.faultVal = faultVal;
	}

	public int getOutputVal() {
		return outputVal;
	}

	public void setOutputVal(int outputVal) {
		this.outputVal = outputVal;
	}

	public int getAccStatus() {
		return accStatus;
	}

	public void setAccStatus(int accStatus) {
		this.accStatus = accStatus;
	}

	public int getWaterStatus() {
		return waterStatus;
	}

	public void setWaterStatus(int waterStatus) {
		this.waterStatus = waterStatus;
	}

	public int getDumpStatus() {
		return dumpStatus;
	}

	public void setDumpStatus(int dumpStatus) {
		this.dumpStatus = dumpStatus;
	}

	public int getSewageStatus() {
		return sewageStatus;
	}

	public void setSewageStatus(int sewageStatus) {
		this.sewageStatus = sewageStatus;
	}

	public int getPlateStatus() {
		return plateStatus;
	}

	public void setPlateStatus(int plateStatus) {
		this.plateStatus = plateStatus;
	}

	public int getNozzleStatus() {
		return nozzleStatus;
	}

	public void setNozzleStatus(int nozzleStatus) {
		this.nozzleStatus = nozzleStatus;
	}

	public int getWateringStatus() {
		return wateringStatus;
	}

	public void setWateringStatus(int wateringStatus) {
		this.wateringStatus = wateringStatus;
	}

	public double getBaiduLng() {
		return baiduLng;
	}

	public void setBaiduLng(double baiduLng) {
		this.baiduLng = baiduLng;
	}

	public double getBaiduLat() {
		return baiduLat;
	}

	public void setBaiduLat(double baiduLat) {
		this.baiduLat = baiduLat;
	}

	public String getBaiduLocation() {
		return baiduLocation;
	}

	public void setBaiduLocation(String baiduLocation) {
		this.baiduLocation = baiduLocation;
	}

	public int getIsBaiduPosition() {
		return isBaiduPosition;
	}

	public void setIsBaiduPosition(int isBaiduPosition) {
		this.isBaiduPosition = isBaiduPosition;
	}

	public int getIsBaiduLocation() {
		return isBaiduLocation;
	}

	public void setIsBaiduLocation(int isBaiduLocation) {
		this.isBaiduLocation = isBaiduLocation;
	}

	public String getEquipmentId() {
		return equipmentId;
	}

	public void setEquipmentId(String equipmentId) {
		this.equipmentId = equipmentId;
	}

	public int getSpeed2() {
		return speed2;
	}

	public void setSpeed2(int speed2) {
		this.speed2 = speed2;
	}

	public int getSweepSpeed2() {
		return sweepSpeed2;
	}

	public void setSweepSpeed2(int sweepSpeed2) {
		this.sweepSpeed2 = sweepSpeed2;
	}

	public int getBinStatus() {
		return binStatus;
	}

	public void setBinStatus(int binStatus) {
		this.binStatus = binStatus;
	}

	public double getDirection() {
		return direction;
	}

	public void setDirection(double direction) {
		this.direction = direction;
	}

	public double getMileage() {
		return mileage;
	}

	public void setMileage(double mileage) {
		this.mileage = mileage;
	}

	public double getMileage2() {
		return mileage2;
	}

	public void setMileage2(double mileage2) {
		this.mileage2 = mileage2;
	}

	public String getCompanyCode() {
		return companyCode;
	}

	public void setCompanyCode(String companyCode) {
		this.companyCode = companyCode;
	}

	public double getTodayMile() {
		return todayMile;
	}

	public void setTodayMile(double todayMile) {
		this.todayMile = todayMile;
	}

	public int getStuffStatus() {
		return stuffStatus;
	}

	public void setStuffStatus(int stuffStatus) {
		this.stuffStatus = stuffStatus;
	}

	public double getTotalMile() {
		return totalMile;
	}

	public void setTotalMile(double totalMile) {
		this.totalMile = totalMile;
	}

	public int getStrengthStatus() {
		return strengthStatus;
	}

	public void setStrengthStatus(int strengthStatus) {
		this.strengthStatus = strengthStatus;
	}

	public String getProjectname() {
		return projectname;
	}

	public void setProjectname(String projectname) {
		this.projectname = projectname;
	}

	public String getPlateNO() {
		return plateNO;
	}

	public void setPlateNO(String plateNO) {
		this.plateNO = plateNO;
	}

	public String getCategoryName() {
		return categoryName;
	}

	public void setCategoryName(String categoryName) {
		this.categoryName = categoryName;
	}

	public String getDriverNames() {
		return driverNames;
	}

	public void setDriverNames(String driverNames) {
		this.driverNames = driverNames;
	}

	public String getAlarmCategoryName() {
		return alarmCategoryName;
	}

	public void setAlarmCategoryName(String alarmCategoryName) {
		this.alarmCategoryName = alarmCategoryName;
	}

	public Timestamp getAlarmTime() {
		return alarmTime;
	}

	public void setAlarmTime(Timestamp alarmTime) {
		this.alarmTime = alarmTime;
	}

	public Timestamp getSystemTime() {
		return systemTime;
	}

	public void setSystemTime(Timestamp systemTime) {
		this.systemTime = systemTime;
	}

	public String getAlarmInfo() {
		return alarmInfo;
	}

	public void setAlarmInfo(String alarmInfo) {
		this.alarmInfo = alarmInfo;
	}

	public String getAlarmName() {
		return alarmName;
	}

	public void setAlarmName(String alarmName) {
		this.alarmName = alarmName;
	}

	public String getProjectId() {
		return projectId;
	}

	public void setProjectId(String projectId) {
		this.projectId = projectId;
	}

	public String getKindcode() {
		return kindcode;
	}

	public void setKindcode(String kindcode) {
		this.kindcode = kindcode;
	}

	public int getOilAmt2() {
		return oilAmt2;
	}

	public void setOilAmt2(int oilAmt2) {
		this.oilAmt2 = oilAmt2;
	}

	public int getOilAmt3() {
		return oilAmt3;
	}

	public void setOilAmt3(int oilAmt3) {
		this.oilAmt3 = oilAmt3;
	}

	public double getTodayMile2() {
		return todayMile2;
	}

	public void setTodayMile2(double todayMile2) {
		this.todayMile2 = todayMile2;
	}

	public double getTotalMile2() {
		return totalMile2;
	}

	public void setTotalMile2(double totalMile2) {
		this.totalMile2 = totalMile2;
	}

	public Timestamp getEndTimestamp() {
		return endTimestamp;
	}

	public void setEndTimestamp(Timestamp endTimestamp) {
		this.endTimestamp = endTimestamp;
	}

	public int getIsInWork() {
		return isInWork;
	}

	public void setIsInWork(int isInWork) {
		this.isInWork = isInWork;
	}

	public String getAlarmRemark() {
		return alarmRemark;
	}

	public void setAlarmRemark(String alarmRemark) {
		this.alarmRemark = alarmRemark;
	}

	public String getCmdTitle() {
		return cmdTitle;
	}

	public void setCmdTitle(String cmdTitle) {
		this.cmdTitle = cmdTitle;
	}

	public double getOilAmtCal() {
		return oilAmtCal;
	}

	public void setOilAmtCal(double oilAmtCal) {
		this.oilAmtCal = oilAmtCal;
	}

	public double getFuel() {
		return fuel;
	}

	public void setFuel(double fuel) {
		this.fuel = fuel;
	}

	public int getHeightAmt() {
		return heightAmt;
	}

	public void setHeightAmt(int heightAmt) {
		this.heightAmt = heightAmt;
	}

	public int getOutPut0() {
		return outPut0;
	}

	public void setOutPut0(int outPut0) {
		this.outPut0 = outPut0;
	}

	public int getOutPut1() {
		return outPut1;
	}

	public void setOutPut1(int outPut1) {
		this.outPut1 = outPut1;
	}

	public int getBatteryStatus() {
		return batteryStatus;
	}

	public void setBatteryStatus(int batteryStatus) {
		this.batteryStatus = batteryStatus;
	}

	public int getGpsAirStatus() {
		return gpsAirStatus;
	}

	public void setGpsAirStatus(int gpsAirStatus) {
		this.gpsAirStatus = gpsAirStatus;
	}

	public int getConfigStatus() {
		return configStatus;
	}

	public void setConfigStatus(int configStatus) {
		this.configStatus = configStatus;
	}

	public String getAreaId() {
		return areaId;
	}

	public void setAreaId(String areaId) {
		this.areaId = areaId;
	}

	public String getRefId() {
		return refId;
	}

	public void setRefId(String refId) {
		this.refId = refId;
	}

	public double getOilAmtCal2() {
		return oilAmtCal2;
	}

	public void setOilAmtCal2(double oilAmtCal2) {
		this.oilAmtCal2 = oilAmtCal2;
	}

	public double getOilAmtCal3() {
		return oilAmtCal3;
	}

	public void setOilAmtCal3(double oilAmtCal3) {
		this.oilAmtCal3 = oilAmtCal3;
	}

	public int getServiceStatus() {
		return serviceStatus;
	}

	public void setServiceStatus(int serviceStatus) {
		this.serviceStatus = serviceStatus;
	}

	public String getRfid() {
		return rfid;
	}

	public void setRfid(String rfid) {
		this.rfid = rfid;
	}

	public long getKeepTime() {
		return keepTime;
	}

	public void setKeepTime(long keepTime) {
		this.keepTime = keepTime;
	}

	public boolean isCheckTime() {
		return checkTime;
	}

	public void setCheckTime(boolean checkTime) {
		this.checkTime = checkTime;
	}

	public String getBaiduStreet() {
		return BaiduStreet;
	}

	public void setBaiduStreet(String baiduStreet) {
		BaiduStreet = baiduStreet;
	}

	public int getHasAlarm() {
		return hasAlarm;
	}

	public void setHasAlarm(int hasAlarm) {
		this.hasAlarm = hasAlarm;
	}

	public double getOilValue() {
		return oilValue;
	}

	public void setOilValue(double oilValue) {
		this.oilValue = oilValue;
	}

	public double getOilPercent() {
		return oilPercent;
	}

	public void setOilPercent(double oilPercent) {
		this.oilPercent = oilPercent;
	}
		
	public GpsBean(GpsSignal gpsSignal,Vehicle vehicle,AlarmInfo ai) {
		this.setId(gpsSignal.signalId);
		this.setGpsTime(gpsSignal.gpsTime);
		this.setEquipNum(gpsSignal.gpsNo);
		this.setProjectname(vehicle.company.companyName);
		this.setLongitude(gpsSignal.lng);
		this.setLatitude(gpsSignal.lat);
		this.setFuel(gpsSignal.oilAmt);
		this.setSpeed(gpsSignal.speed);
		this.setMotorSpeed(gpsSignal.majSpeed);
		this.setAuxiMotorSpeed(gpsSignal.subSpeed);
		this.setSweepSpeed(gpsSignal.discSpeed);
		this.setOdorValue(gpsSignal.smellAmt);
		this.setStatusVal(gpsSignal.statusValue);
		this.setSwitchVal(gpsSignal.switchValue);
		this.setFaultVal(gpsSignal.hitchValue);
		this.setTodayMile(gpsSignal.todayMile);
		this.setMileage(gpsSignal.curMile);
		this.setPlateNO(vehicle.plateNO);						
		this.setBaiduLocation(gpsSignal.baiduLocation);
		this.setAlarmTime(new Timestamp(ai.alarmTime.getTime()));
		this.setSystemTime(new Timestamp(new Date().getTime()));
		this.setAlarmInfo(ai.alarmMessage);
		this.setAlarmType(ai.alarmType);
		this.setTodayMile(gpsSignal.todayMile);
		this.setTotalMile(gpsSignal.totalMile);
		this.setMileage(gpsSignal.curMile);
		this.setMileage2(gpsSignal.curMile2);
		this.setFuel(gpsSignal.oilAmt);
		this.setMotorSpeed(gpsSignal.majSpeed);
		this.setAuxiMotorSpeed(gpsSignal.subSpeed);
		this.setSweepSpeed(gpsSignal.discSpeed);
		this.setOdorValue(gpsSignal.smellAmt);
		this.setRecoWeight(gpsSignal.recycleAmt);
		this.setUnrecoWeight(gpsSignal.notRecycleAmt);
		this.setWateringStatus(gpsSignal.waterStatus);
		this.setDumpStatus(gpsSignal.dumpStatus);
		this.setSewageStatus(gpsSignal.sewageStatus);
		this.setPlateStatus(gpsSignal.plateStatus);
		this.setNozzleStatus(gpsSignal.nozzleStatus);
		this.setWateringStatus(gpsSignal.wateringStatus);
		this.setBinStatus(gpsSignal.binStatus);
		this.setStuffStatus(gpsSignal.stuffStatus);
		if (null != gpsSignal.areaId) {
			if (null != vehicle.getAreas().get(gpsSignal.areaId)) {
				setAlarmName(vehicle.getAreas().get(gpsSignal.areaId).name);
			}
		}
		this.setCompanyCode(gpsSignal.companyCode);
	}
}	
